/*****************************************************************//**
 * \file   AnsysAPDLReader_NBLOCK.h
 * \brief  AnsysAPDLReader_NBLOCK
 *
 * \author Wyatt
 * \date   May 2023
 *********************************************************************/
#pragma once

#include "AnsysAPDLReaderBase.h"
#include "AnsysDataDef.h"


class AnsysAPDLReader_NBLOCK : public ReaderBase
{
	DECLARE_CDB_READER(AnsysAPDLReader_NBLOCK)

public:
	AnsysAPDLReader_NBLOCK(CDBReader* pCDBReader);
	virtual ~AnsysAPDLReader_NBLOCK(void) {}

	std::vector<int> _nodeIdRead;

protected:
	int _nodeCnt = 0;
	int NDMAX = 0, NDSEL = 0;
	bool _bSolid = false;
	int _nCellNum = 0;
	int _nLine = 1;
	std::string _strFormat;
	int nI = 0;
	int wI = 0;
	int nd = 0;
	int wd = 0;
	int wexp = 0;
public:
	std::vector<int> node_coord_control;

public:
	bool Scan(std::string& strDataLine);
	bool Read(std::string& strDataLine);

protected:
	bool ScanHead(std::string& strDataLine);
	bool ScanData(std::string& strDataLine);
	bool ReadHead(std::string& strDataLine);
	bool ReadData(std::string& strDataLine);

};
